#ifndef _SPRING_H
#define _SPRING_H

#include "Constraint.h"
#include "Particle.h"

/**
 * Spring is a type of length preservation constraint.
 */
class Spring: public Constraint {
public:
	Particle* particle1;
	Particle* particle2;
	double restLength; // length at rest
	double stiffness;
public:
	Spring(Particle* _particle1, Particle* _particle2, double _stiffness);
	void satisfyConstraint();
	~Spring() {}
};
#endif /* _SPRING_H */
